package com.warmheart.base.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Documented
@Inherited
public @interface Duplicate {

    /**
     * 是否需要重复提交验证
     * 
     * @return
     */
    public boolean validate() default true;

    /**
     * 
     * @Title: custom
     * @Description: 是否自定义时间间隔
     * @author ZhangJianyang
     * @return
     */
    public boolean custom() default false;

    /**
     * 
     * @Title: clickTime
     * @Description: 重复点击时间间隔
     * @author ZhangJianyang
     * @return
     */
    public int clickTime() default 1;

    /**
     * 
     * @Title: timeUnit
     * @Description: 时间间隔单位
     * @author ZhangJianyang
     * @return
     */
    public TimeUnit timeUnit() default TimeUnit.SECONDS;
}
